package xyz.luhui1hao.o2o.service.impl;

import ch.qos.logback.classic.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyz.luhui1hao.o2o.domain.Area;
import xyz.luhui1hao.o2o.mapper.AreaMapper;
import xyz.luhui1hao.o2o.service.AreaService;

import java.util.List;

@Service
public class AreaServiceImpl implements AreaService {
    Logger logger = (Logger) LoggerFactory.getLogger(getClass());

    @Autowired
    private AreaMapper areaMapper;

    @Override
    public List<Area> getAreaList() {
        long startTime = System.currentTimeMillis();
        long endTime = System.currentTimeMillis();
        logger.info("{}ms", endTime - startTime);
        return areaMapper.queryArea();

    }
}
